﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Admin;
using System.Data.SqlClient;


namespace Testing
{
    class Program
    {
        static void Main(string[] args)
        {
            try
            {
                SqlConnection connection = new SqlConnection("user id=g04_adm;" +
                               "password=uk20fv$b;server=130.237.226.228;" +
                               "database=databas; " +
                               "connection timeout=5");
                connection.Open();
                String username = "js001";
                String password = "password";
                SqlDataReader reader = null;
                String q = "SELECT COUNT(*) FROM databas.dbo.Users WHERE name=\'" + username + "\' AND passwd = \'" + password + "\' AS cnt";
                SqlCommand c = new SqlCommand(q, connection);
                reader = c.ExecuteReader();
            }
            catch (Exception e)
            {
                Console.WriteLine(e.Message);
            }

            /*SQLManager asd;
            asd = new SQLManager();
            bool loggedIn = asd.login("js001", "password");
            Console.WriteLine("Login: " + loggedIn); */

        }
    }
}
